/*
 * stemer.h
 *
 *  Created on: 16.10.2012
 *      Author: work
 */

#ifndef STEMER_H_
#define STEMER_H_

#include <string>

namespace stemming
{
    namespace ru
    {
        /** Replace word with its stem.
         *  @param word - zero terminated string containing russian characters in cp1251 encoding.
         *  @reurn pointer to original sequence
         *  This function modifies original sequence. Additional memory is not allocated, complexity - linear,
         *  in relation of number of characters.
         *  Word must be in the lowercase.
         */
        char* replace(char* word);

        /** Find stem of the keyword.
         *  @param word - zero terminated string containing russian characters in cp1251 encoding.
         *  @return string containing stem of the word
         *  This function creates copy of the original sequence. Complexity is linear, in relation to number of characters.
         *  Word must be in the lowercase.
         */
        std::string find(char const* word);

        /** Find stem of the keyword.
         *  @param word - string containing russian characters in cp1251 encoding.
         *  @return string containing stem of the word
         *  This function creates copy of the original sequence. Complexity is linear, in relation to number of characters.
         *  Word must be in the lowercase.
         */
        std::string find(std::string const& word);
    }
}
#endif /* STEMER_H_ */
